package com.study.example.gameserver.config;

import com.sparrow.resource.annotation.*;
import com.sparrow.resource.convert.impl.IntArrayGroupConverter;
import it.unimi.dsi.fastutil.ints.IntArrayList;

import java.util.List;

@Resource("config/MonsterResource.xlsx")
public class MonsterResource {
    @ID
    private int id;
    @NotNull
    private String name;
    @Range(min = 0, max = Integer.MAX_VALUE)
    private int atk;
    private int hp;
    /**
     * 行为树ai配置名
     */
    private String ai;

    private float speed;
    private int def;
    private int reviveTime;
    /**
     * 掉落次数(区间随机)
     */
    private int[] dropCount;
    @Convert(value = IntArrayGroupConverter.class)
    private List<int[]> dropItem;
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAtk() {
        return atk;
    }

    public void setAtk(int atk) {
        this.atk = atk;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public void setAi(String ai) {
        this.ai = ai;
    }

    public String getAi() {
        return ai;
    }

    public void setSpeed(float speed) {
        this.speed = speed;
    }

    public float getSpeed() {
        return speed;
    }

    public int getDef() {
        return def;
    }

    public void setDef(int def) {
        this.def = def;
    }

    public int getReviveTime() {
        return reviveTime;
    }

    public void setReviveTime(int reviveTime) {
        this.reviveTime = reviveTime;
    }

    public int[] getDropCount() {
        return dropCount;
    }

    public void setDropCount(int[] dropCount) {
        this.dropCount = dropCount;
    }

    public List<int[]> getDropItem() {
        return dropItem;
    }

    public void setDropItem(List<int[]> dropItem) {
        this.dropItem = dropItem;
    }

    //    @Check
//    public void check(ResourceCache<Integer, SceneResource> sceneResourceCache) {
//        //检查逻辑
//    }

}
